/**
 * Apr 25, 2010
 */
package org.tomale.id.projects.ui;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;
import org.tomale.id.projects.Activator;

/**
 * @author ferd
 *
 */
public class PredefinedTaskEditorInput implements IEditorInput {

	public static final String INPUT_NAME = "Predefined Task";
	public static final String INPUT_TOOLTIP = "Predefined Task";

	String _name;
	String _desc;
	String _duration;
	String _unit;
	
	public PredefinedTaskEditorInput(){
		
	}
	
	public PredefinedTaskEditorInput(final String name, 
			final String description, final String duration, final String unit){
		_name = name;
		_desc = description;
		_duration = duration;
		_unit = unit;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.ui.IEditorInput#exists()
	 */
	@Override
	public boolean exists() {
		return true;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
	 */
	@Override
	public ImageDescriptor getImageDescriptor() {
		return Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/edit.png");
	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IEditorInput#getName()
	 */
	@Override
	public String getName() {
		return INPUT_NAME;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IEditorInput#getPersistable()
	 */
	@Override
	public IPersistableElement getPersistable() {
		return null;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
	 */
	@Override
	public String getToolTipText() {
		return INPUT_TOOLTIP;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
	 */
	@Override
	public Object getAdapter(Class adapter) {
		// TODO Auto-generated method stub
		return null;
	}

	public String getTaskName(){
		return _name;
	}
	
	public String getTaskDescription(){
		return _desc;
	}
	
	public String getDuration(){
		return _duration;
	}
	
	public String getDurationUnit(){
		return _unit;
	}
}
